1 Original Data (not normalized on CD42b)

1.1 Read Data

sce <- readRDS("data/sce_original_RPs_MPs.rds")
de_res_b <- readRDS("data/de_results_baseline_original.rds")
de_res_a <- readRDS("data/de_results_stimulated_original.rds")

1.2 Marker Distributions

1.2.1 State Markers

features <- "state"

plotPbExprsMod(sce,
               k = "all",
               features = features,
               assay = "exprs",
               fun = "median",
               color_by = "subgroup2",
               facet_by = "antigen",
               shape_by = "activation")

CATALYST::plotExprs(sce,
                    color_by = "subgroup2",
                    features = features,
                    assay = "exprs")

1.2.2 Type Markers

features <- "type"

plotPbExprsMod(sce,
               k = "all",
               features = features,
               assay = "exprs",
               fun = "median",
               color_by = "subgroup2",
               facet_by = "antigen",
               shape_by = "activation")

CATALYST::plotExprs(sce,
                    color_by = "subgroup2",
                    features = features,
                    assay = "exprs")

1.3 DE Results

1.3.1 Paired t-test

1.3.1.1 Baseline RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_b$t_test,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_b$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_b, method = "t_test")

1.3.1.2 Stimulated RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_a$t_test,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_a$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_a, method = "t_test")

1.3.2 CyEMD

1.3.2.1 Baseline RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_b$CyEMD,
                      top_n = 20,
                      fdr = 0.05,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_b$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_b, method = "CyEMD")

1.3.2.2 Stimulated RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_a$CyEMD,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_a$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_a, method = "CyEMD")

1.4 DE Comparison

1.4.1 Baseline RPs vs. MPs

createVennHeatmap(de_res_b)

1.4.2 Activated RPs vs. MPs

createVennHeatmap(de_res_a)

2 Normalized Data (on CD42b)

2.1 Read Data

sce <- readRDS("data/sce_CD42b_RPs_MPs.rds")
de_res_b <- readRDS("data/de_results_baseline_CD42b.rds")
de_res_a <- readRDS("data/de_results_stimulated_CD42b.rds")

2.2 Marker Distributions

2.2.1 State Markers

features <- "state"

plotPbExprsMod(sce,
               k = "all",
               features = features,
               assay = "exprs",
               fun = "median",
               color_by = "subgroup2",
               facet_by = "antigen",
               shape_by = "activation")

CATALYST::plotExprs(sce,
                    color_by = "subgroup2",
                    features = features,
                    assay = "exprs")

2.2.2 Type Markers

features <- "type"

plotPbExprsMod(sce,
               k = "all",
               features = features,
               assay = "exprs",
               fun = "median",
               color_by = "subgroup2",
               facet_by = "antigen",
               shape_by = "activation")

CATALYST::plotExprs(sce,
                    color_by = "subgroup2",
                    features = features,
                    assay = "exprs")

2.3 DE Results

2.3.1 Paired t-test

2.3.1.1 Baseline RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_b$t_test,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_b$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_b, method = "t_test")

2.3.1.2 Stimulated RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_a$t_test,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_a$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_a, method = "t_test")

2.3.2 CyEMD

2.3.2.1 Baseline RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_b$CyEMD,
                      top_n = 20,
                      fdr = 0.05,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_b$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_b, method = "CyEMD")

2.3.2.2 Stimulated RPs vs. MPs

plotDiffHeatmapCustom(x = sce,
                      y = de_res_a$CyEMD,
                      col_anno = c("subgroup", "patient_id"),
                      k = "all",
                      top_n = 20,
                      fdr = 0.05,
                      lfc = 1,
                      all = TRUE,
                      eff_r = de_res_a$effect_size,
                      sort_by = "padj",
                      assay = "exprs",
                      fun = "median",
                      normalize = TRUE
                      )

print_DE_top_table(sce, de_res_a, method = "CyEMD")

2.4 DE Comparison

2.4.1 Baseline RPs vs. MPs

createVennHeatmap(de_res_b)

2.4.2 Activated RPs vs. MPs

createVennHeatmap(de_res_a)